/*                                  ATELIER                                   */

/* %%LICENSE_TAG%%                                                            */
package edu.gmu.view.canvas;

import java.awt.BorderLayout;
import javax.swing.JPanel;

/**
 * The CanvasPanel has a Canvas in a normal JPanel.  This
 * helps control the contained Canvas to play nice
 * with other Components.
 */
public class CanvasPanel extends JPanel
{
    /**
     * canvas.
     */
    protected Canvas canvas = null;
    
    /**
     * Creates a new CanvasPanel with specified values.
     * @param canvas
     */
    public CanvasPanel( Canvas canvas )
    {
        super( );
        
        this.canvas = canvas;
        
        this.setLayout( new BorderLayout() );
        this.add( canvas, BorderLayout.CENTER );
    }
    
    /**
     * Gets this Panel's canvas.
     * @return
     */
    public Canvas getCanvas( )
    {
        return this.canvas;
    }
    
    
}

/*                                  ATELIER                                   */